    '''       
    #######################################################N computation OLD version begins...
    # updated by Wei: 2012/10/20.
    # Let's divided the N computation into 2 parts. N ordered or N not ordered.
    # I think the N order part is pretty much the same as the M part. Isn't? 
    # a dict structure for final judge
    tempImportantPositionsList_N32 = []
    tempImportantPositionsList_N8 = []
    tempImportantPositionsList_N4 = []
    tempImportantPositionsList_N1 = []
    
    indicesConditionDict_N32 = {}
    indicesConditionDict_N8 = {}
    indicesConditionDict_N4 = {}
    indicesConditionDict_N1 = {}
    
    # init condition requirement to be all false
    for i in range(0,len(indicesList)):
        indicesConditionDict_N32[i] = False
        indicesConditionDict_N8[i] = False
        indicesConditionDict_N4[i] = False
        indicesConditionDict_N1[i] = False
    
    
    # do NOT need to do this for N
    # indicesConditionDict_N32[0] = True
    # indicesConditionDict_N8[0] = True
    # indicesConditionDict_N4[0] = True
    # indicesConditionDict_N1[0] = True
    
    # assignment loop
    for indexNumberFromDoc,currentWord in enumerate(doc_words):
        # The variable currentWord is currently NOT used.
        # print "indexNumberFromDoc:",indexNumberFromDoc
        for index,currentIndices in enumerate(indicesList):
            # for the other indices
            for currentIndicesPositionNumber in currentIndices:
                # core judge statements
                # need to maintain the window size to be 1
                
                # in debug mode
                # if currentIndicesPositionNumber >= indexNumberFromDoc and currentIndicesPositionNumber <= indexNumberFromDoc + N_Constant_1:
                
                # in production mode
                if currentIndicesPositionNumber >= indexNumberFromDoc and currentIndicesPositionNumber <= indexNumberFromDoc + N_Constant_1 - 1:
                    #print "enter mark 1"
                    indicesConditionDict_N1[index] = True
                    tempImportantPositionsList_N1.append( (indexNumberFromDoc,currentIndicesPositionNumber,index) )
                
                # need to maintain the window size to be 4
                if currentIndicesPositionNumber >= indexNumberFromDoc and currentIndicesPositionNumber <= indexNumberFromDoc + N_Constant_4 - 1:
                    #print "enter mark 4"
                    indicesConditionDict_N4[index] = True
                    tempImportantPositionsList_N4.append( (indexNumberFromDoc,currentIndicesPositionNumber,index) )
                
                # need to maintain the window size to be 8
                if currentIndicesPositionNumber >= indexNumberFromDoc and currentIndicesPositionNumber <= indexNumberFromDoc + N_Constant_8 - 1:
                    # print "enter mark 8"
                    indicesConditionDict_N8[index] = True
                    tempImportantPositionsList_N8.append( (indexNumberFromDoc,currentIndicesPositionNumber,index) )
                
                # need to maintain the window size to be 32
                if currentIndicesPositionNumber >= indexNumberFromDoc and currentIndicesPositionNumber <= indexNumberFromDoc + N_Constant_32 - 1:
                    #print "enter mark 32"
                    indicesConditionDict_N32[index] = True
                    tempImportantPositionsList_N32.append( (indexNumberFromDoc,currentIndicesPositionNumber,index) )
                    break
              
        # judge loop
        allConditionSafisfiedFlag_N32 = True
        allConditionSafisfiedFlag_N8 = True
        allConditionSafisfiedFlag_N4 = True
        allConditionSafisfiedFlag_N1 = True
        

        for i in indicesConditionDict_N32:
            if indicesConditionDict_N32[i] == False:
                allConditionSafisfiedFlag_N32 =False

        for i in indicesConditionDict_N8:
            if indicesConditionDict_N8[i] == False:
                allConditionSafisfiedFlag_N8 =False

        for i in indicesConditionDict_N4:
            if indicesConditionDict_N4[i] == False:
                allConditionSafisfiedFlag_N4 =False

        for i in indicesConditionDict_N1:
            if indicesConditionDict_N1[i] == False:
                allConditionSafisfiedFlag_N1 =False


        if allConditionSafisfiedFlag_N32:
            #print 
            #print indicesConditionDict_N32
            #print tempImportantPositionsList_N32
            
            outputLine = ""
            for currentTuple in tempImportantPositionsList_N32:
                (current_doc_position,currentPosition,_) = currentTuple
                
                outputLine += doc_words[currentPosition] + " "
                
            #print outputLine
            #print doc_words[current_doc_position:current_doc_position + N_Constant_32]
            tf_N_ordered_32 += 1

        if allConditionSafisfiedFlag_N8:
            #print 
            #print indicesConditionDict_N8
            #print tempImportantPositionsList_N8
            
            outputLine = ""
            for currentTuple in tempImportantPositionsList_N8:
                (current_doc_position,currentPosition,_) = currentTuple
                
                outputLine += doc_words[currentPosition] + " "

            #print outputLine
            #print doc_words[current_doc_position:current_doc_position + N_Constant_8]
            tf_N_ordered_8 += 1

        if allConditionSafisfiedFlag_N4:
            #print 
            #print indicesConditionDict_N4
            #print tempImportantPositionsList_N4
            
            outputLine = ""
            for currentTuple in tempImportantPositionsList_N4:
                (current_doc_position,currentPosition,_) = currentTuple
                
                outputLine += doc_words[currentPosition] + " "
                
            #print outputLine
            #print doc_words[current_doc_position:current_doc_position + N_Constant_4]
            tf_N_ordered_4 += 1
        
        # for M1
        if allConditionSafisfiedFlag_N1:
            #print 
            #print indicesConditionDict_N1
            #print tempImportantPositionsList_N1
            
            outputLine = ""
            for currentTuple in tempImportantPositionsList_N1:
                (current_doc_position,currentPosition,_) = currentTuple
                
                outputLine += doc_words[currentPosition] + " "
                
            #print outputLine
            #print doc_words[current_doc_position:current_doc_position + N_Constant_1]
            tf_N_ordered_1 += 1            
            
                     
        # reset the judge dict
        for i in range(0,len(indicesList)):
            indicesConditionDict_N32[i] = False
        del tempImportantPositionsList_N32[:]
        
        # reset the judge dict
        for i in range(0,len(indicesList)):
            indicesConditionDict_N8[i] = False
        del tempImportantPositionsList_N8[:]
        
        # reset the judge dict
        for i in range(0,len(indicesList)):
            indicesConditionDict_N4[i] = False
        del tempImportantPositionsList_N4[:]
        
        # reset the judge dict
        for i in range(0,len(indicesList)):
            indicesConditionDict_N1[i] = False
        del tempImportantPositionsList_N1[:]
        
       
    #######################################################N computation OLD version ends.
    '''